using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using PowerManage.Entity.Utils;

namespace PowerManage.Entity.Dtos.Accounts;

/// <summary>
/// 账号更新密码
/// </summary>
public class AccountUpdatePasswordDto
{
    /// <summary>
    /// 原本密码
    /// </summary>
    [Required]
    [StringLength(20, MinimumLength = 6)]
    [JsonConverter(typeof(DesensitizationConverter), 2, 4)]
    public string OldPassword { get; set; }

    /// <summary>
    /// 新密码
    /// </summary>
    [Required]
    [StringLength(20, MinimumLength = 6)]
    [JsonConverter(typeof(DesensitizationConverter), 2, 4)]
    public string NewPassword { get; set; }
}